]> dgit.raspbian.org Git - gnome-shell.git/commit
errorUtils: Add logErrorUnlessCancelled() helper
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 22 Oct 2025 00:59:20 +0000 (02:59 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 24 Nov 2025 13:42:59 +0000 (14:42 +0100)
commitb129de65252e17122aa0408090400bcb5d2eb0f4
tree808af8e36a8d276530f1adc69effd33bf3657467
parent4cfd5608324adc7529366d600101d0a4366fd41d
errorUtils: Add logErrorUnlessCancelled() helper

It is quite common to handle errors by ignoring them in case of
CANCELLED, and otherwise log them via logError().

Add a small helper method that implements that behavior, including
if the original error is wrapped in a Gio.DBusError.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3927>
(cherry picked from commit b4b739dc5193cab1e6fc48ce1e9d631a7aa2c1f0)
js/misc/errorUtils.js
tests/meson.build
tests/unit/errorUtils.js [new file with mode: 0644]